#include "helper_methods.h"

namespace Helper
{

    String strtotime(String format, time_t timeStamp)
    {
        timeStamp = timeStamp + 8 * 3600;
        int len = 40;
        struct tm *timeinfo = nullptr;
        char buffer[len];
        timeinfo = localtime(&timeStamp);
        strftime(buffer, len, format.c_str(), timeinfo);
        return String(buffer);
    }

}